﻿using Microsoft.IdentityModel.Tokens;
using System.Text;

namespace JwtDemo.Api.Options
{
    public class JwtOptions
    {
        public const string Name = "Jwt";

        public string Audience { get; set; }
        public string Issuer { get; set; }
        public double ExpiresMinutes { get; set; } = 30d;
        public Encoding Encoding { get; set; } = Encoding.UTF8;
        public string SymmetricSecurityKeyString { get; set; }
        public SymmetricSecurityKey SymmetricSecurityKey => new(Encoding.GetBytes(SymmetricSecurityKeyString));
    }
}
